package com.czxy.demo05;

import java.util.Random;

public class Test01 {
    public static void main(String[] args) {

        Random rd = new Random();
        int a = rd.nextInt(10000 - 1) + 1;

        String str = getStr(a);
        System.out.println(str);
    }
    public static String getStr(int a){
        String s = a+"";
        while (s.length()<4){
            s="0"+s;
        }
        return s;
    }
}
